package com.dxy.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.dxy.common.pojo.Resource;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface ResourceMapper extends BaseMapper<Resource> {

    @Select("select * from t_resource where id in (select resource_id from t_role_resource where role_id in (select role_id from t_user_role where user_id = #{userId}))")
    List<Resource> findUserResource(Integer userId);
}
